import request from '@/axios/index'
const chart = {
    getChartTotal(id = null):Promise<{name:string;value:number}[]>{
        return request({
            url:`/chart/dataFlow?${id?id:''}`,
            method:'get'
        })
    },
    getProvinceFlow():Promise<{province:string,value:number}[]>{
        return request({
            url:`/chart/provinceFlow`,
            method:'get'
        })
    },
    getIPFlow():Promise<{ip:string,value:number}[]>{
        return request({
            url:`/chart/IPFlow`,
            method:'get'
        })
    },
    getEmailFlow():Promise<{email:string,time:string,value:number}[]>{
        return request({
            url:`/chart/email`,
            method:'get'
        })
    }
}

export default chart